/******************************************************************************
 * Copyright 2023 The Apollo Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *****************************************************************************/

#pragma once

#include "modules/canbus_vehicle/x3epro/proto/x3epro.pb.h"
#include "modules/drivers/canbus/can_comm/protocol_data.h"

namespace apollo {
namespace canbus {
namespace x3epro {

class Vcuvehiclefaultresponse201 : public ::apollo::drivers::canbus::ProtocolData<
                    ::apollo::canbus::X3epro> {
 public:
  static const int32_t ID;
  Vcuvehiclefaultresponse201();
  void Parse(const std::uint8_t* bytes, int32_t length,
                     X3epro* chassis) const override;

 private:

    // config detail: {'bit': 3, 'enum': {0: 'VEHICLE_ERROR_INDICATIONSVCU_NO_ERROR', 1: 'VEHICLE_ERROR_INDICATIONSVCU_LEVEL_1_ERROR', 2: 'VEHICLE_ERROR_INDICATIONSVCU_LEVEL_2_ERROR', 3: 'VEHICLE_ERROR_INDICATIONSVCU_LEVEL_3_ERROR', 4: 'VEHICLE_ERROR_INDICATIONSVCU_LEVEL_4_ERROR', 5: 'VEHICLE_ERROR_INDICATIONSVCU_LEVEL_5_ERROR'}, 'is_signed_var': False, 'len': 4, 'name': 'Vehicle_Error_IndicationsVCU', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Vehicle_error_indicationsvcuType vehicle_error_indicationsvcu(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 7, 'enum': {0: 'BRAKE_SYSTEM_ERROREHB_NO_ERROR', 1: 'BRAKE_SYSTEM_ERROREHB_LEVEL_1_ERROR', 2: 'BRAKE_SYSTEM_ERROREHB_LEVEL_2_ERROR', 3: 'BRAKE_SYSTEM_ERROREHB_LEVEL_3_ERROR', 4: 'BRAKE_SYSTEM_ERROREHB_LEVEL_4_ERROR', 5: 'BRAKE_SYSTEM_ERROREHB_LEVEL_5_ERROR'}, 'is_signed_var': False, 'len': 4, 'name': 'Brake_System_ErrorEHB', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Brake_system_errorehbType brake_system_errorehb(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 11, 'enum': {0: 'EPS_ERROR_NO_ERROR', 1: 'EPS_ERROR_LEVEL_1_ERROR', 2: 'EPS_ERROR_LEVEL_2_ERROR', 3: 'EPS_ERROR_LEVEL_3_ERROR', 4: 'EPS_ERROR_LEVEL_4_ERROR', 5: 'EPS_ERROR_LEVEL_5_ERROR'}, 'is_signed_var': False, 'len': 4, 'name': 'EPS_Error', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Eps_errorType eps_error(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 15, 'enum': {0: 'MOTOR_ERROR_NO_ERROR', 1: 'MOTOR_ERROR_LEVEL_1_ERROR', 2: 'MOTOR_ERROR_LEVEL_2_ERROR', 3: 'MOTOR_ERROR_LEVEL_3_ERROR', 4: 'MOTOR_ERROR_LEVEL_4_ERROR', 5: 'MOTOR_ERROR_LEVEL_5_ERROR'}, 'is_signed_var': False, 'len': 4, 'name': 'Motor_Error', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Motor_errorType motor_error(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 19, 'enum': {0: 'EPB_ERROR_NO_ERROR', 1: 'EPB_ERROR_LEVEL_1_ERROR', 2: 'EPB_ERROR_LEVEL_2_ERROR', 3: 'EPB_ERROR_LEVEL_3_ERROR', 4: 'EPB_ERROR_LEVEL_4_ERROR', 5: 'EPB_ERROR_LEVEL_5_ERROR'}, 'is_signed_var': False, 'len': 4, 'name': 'EPB_Error', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Epb_errorType epb_error(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 23, 'enum': {0: 'HIGH_VOLTAGE_BATTERY_ERRORBCU_NO_ERROR', 1: 'HIGH_VOLTAGE_BATTERY_ERRORBCU_LEVEL_1_ERROR', 2: 'HIGH_VOLTAGE_BATTERY_ERRORBCU_LEVEL_2_ERROR', 3: 'HIGH_VOLTAGE_BATTERY_ERRORBCU_LEVEL_3_ERROR', 4: 'HIGH_VOLTAGE_BATTERY_ERRORBCU_LEVEL_4_ERROR', 5: 'HIGH_VOLTAGE_BATTERY_ERRORBCU_LEVEL_5_ERROR'}, 'is_signed_var': False, 'len': 4, 'name': 'High_Voltage_Battery_ErrorBCU', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::High_voltage_battery_errorbcuType high_voltage_battery_errorbcu(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 32, 'enum': {0: 'AUTOMODE_EXIT_REASON_LOSSCOMMUNICATION_WITH_ADU_NORMAL', 1: 'AUTOMODE_EXIT_REASON_LOSSCOMMUNICATION_WITH_ADU_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_LossCommunication_with_ADU', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_losscommunication_with_aduType automode_exit_reason_losscommunication_with_adu(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 33, 'enum': {0: 'AUTOMODE_EXIT_REASON_REQSIGNALNOTSATISTIED_NORMAL', 1: 'AUTOMODE_EXIT_REASON_REQSIGNALNOTSATISTIED_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_ReqSignalNotSatistied', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_reqsignalnotsatistiedType automode_exit_reason_reqsignalnotsatistied(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 34, 'enum': {0: 'AUTOMODE_EXIT_REASON_LOW_POWER_NORMAL', 1: 'AUTOMODE_EXIT_REASON_LOW_POWER_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_Low_Power', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_low_powerType automode_exit_reason_low_power(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 35, 'enum': {0: 'AUTOMODE_EXIT_REASON_HIGHVOLT_NORMAL', 1: 'AUTOMODE_EXIT_REASON_HIGHVOLT_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_HighVolt', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_highvoltType automode_exit_reason_highvolt(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 36, 'enum': {0: 'AUTOMODE_EXIT_REASON_VEHICLE_FLT_NORMAL', 1: 'AUTOMODE_EXIT_REASON_VEHICLE_FLT_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_Vehicle_Flt', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_vehicle_fltType automode_exit_reason_vehicle_flt(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 37, 'enum': {0: 'AUTOMODE_EXIT_REASON_PRESS_EMERGENCY_BUTTON_NORMAL', 1: 'AUTOMODE_EXIT_REASON_PRESS_EMERGENCY_BUTTON_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_Press_Emergency_Button', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_press_emergency_buttonType automode_exit_reason_press_emergency_button(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 38, 'enum': {0: 'AUTOMODE_EXIT_REASON_PRESS_REMOTE_CONTROL_NORMAL', 1: 'AUTOMODE_EXIT_REASON_PRESS_REMOTE_CONTROL_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_Press_Remote_Control', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_press_remote_controlType automode_exit_reason_press_remote_control(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 39, 'enum': {0: 'AUTOMODE_EXIT_REASON_PDU_CONTROL_NORMAL', 1: 'AUTOMODE_EXIT_REASON_PDU_CONTROL_FAILURE'}, 'is_signed_var': False, 'len': 1, 'name': 'AutoMode_Exit_Reason_PDU_Control', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Vcu_vehicle_fault_response_201::Automode_exit_reason_pdu_controlType automode_exit_reason_pdu_control(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 51, 'is_signed_var': False, 'len': 4, 'name': 'VCU_FaultRept_AliveCounter', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'int'}
    int vcu_faultrept_alivecounter(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 63, 'is_signed_var': False, 'len': 8, 'name': 'VCU_FaultRept_CheckSum', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'int'}
    int vcu_faultrept_checksum(const std::uint8_t* bytes, const int32_t length) const;
};

}  // namespace x3epro
}  // namespace canbus
}  // namespace apollo


